package com.chenfan.finance.controller;

import com.chenfan.finance.commons.Response;
import com.chenfan.finance.commons.ResponseCode;
import com.chenfan.finance.service.TocAlipayOriginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;


@Controller
@RequestMapping(value = "toc_alipay_origin")
@Api(value = "支付宝流水原始单相关接口")
public class TocAlipayOriginController {

    @Autowired
    private TocAlipayOriginService tocAlipayOriginService;

    @ApiOperation(value = "支付宝流水原始单相关获取每月列表", notes = "支付宝流水原始单相关获取每月列表")
    @GetMapping(value = "compareData")
    public Response getList(){
        return new Response(ResponseCode.SUCCESS,tocAlipayOriginService.compareData());
    }

    @GetMapping(value = "expendExport")
    public Response expendExport(HttpServletResponse response) {
        return new Response(ResponseCode.SUCCESS,tocAlipayOriginService.exportExpend(response));
    }


    @GetMapping(value = "incomeExport")
    public Response incomeExport(HttpServletResponse response) {
        return new Response(ResponseCode.SUCCESS,tocAlipayOriginService.exportIncome(response));
    }
}
